package site.wlwsjsx.iot_backend.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import lombok.Getter;
import lombok.Setter;

import java.time.LocalDateTime;

/**
 * 实验室环境数据表
 * 对应表：lab_env
 */
@Data
@Getter
@Setter
public class LabEnv {
    private Integer id;             // 主键ID
    private Integer labId;          // 关联实验室ID
    private Float humidity;         // 湿度采集值
    private Float temperature;      // 温度采集值
    private Float smokeScope;       // 烟雾传感器采集值
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime; // 创建/更新时间

    public LabEnv() {
    }

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getLabId() {
        return labId;
    }

    public void setLabId(Integer labId) {
        this.labId = labId;
    }

    public Float getHumidity() {
        return humidity;
    }

    public void setHumidity(Float humidity) {
        this.humidity = humidity;
    }

    public Float getTemperature() {
        return temperature;
    }

    public void setTemperature(Float temperature) {
        this.temperature = temperature;
    }

    public Float getSmokeScope() {
        return smokeScope;
    }

    public void setSmokeScope(Float smokeScope) {
        this.smokeScope = smokeScope;
    }

    public LocalDateTime getCreateTime() {
        return createTime;
    }

    public void setCreateTime(LocalDateTime createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "LabEnv{" +
                "id=" + id +
                ", labId=" + labId +
                ", humidity=" + humidity +
                ", temperature=" + temperature +
                ", smokeScope=" + smokeScope +
                ", createTime=" + createTime +
                '}';
    }
}